package com.yc.mybatis.mapper;

import com.yc.mybatis.bean.Movie;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface MovieDao {

    List<Movie> selectLikeName(String name);

    Movie selectById(int id);

    List<Movie> selectByObject(Movie movie);

    int updateById(Movie movie);

    int updateByIdWithoutNull(Movie movie);

    List<Movie> selectByNameAndFlag(
            @Param("name") String name,
            @Param("flag") int flag);


    List<Movie> selectByIdArray(@Param("ids") int[] asdfasdfasdf);

    void insertMovies(@Param("movies")List<Movie> movies);

    List<Movie> selectWithRole(@Param("roleName") String roleName);

    List<Map<String,Object>> selectTime();

    List<Movie> selectOrderBy(@Param("order") String order);

    List<Map<String,Object>> selectBySQL(@Param("sql") String sql);
}
